/**
 * Created by Administrator on 2016/12/2 0002.
 */
app.controller("resource",["$scope",'$location',function($scope,$location){
    $("a").click(function(e){
        e.preventDefault();
    });
    $(".remove").click(function(){
        $(".deleteResource").show();
    });
    $scope.deleteResource = function(){
        $(".deleteResource").hide();
    };
    $scope.cancelDeleteResource = function(){
        $(".deleteResource").hide();
    };
    $('input').iCheck({
        checkboxClass: 'icheckbox_minimal-green',
        radioClass: 'iradio_minimal-green',
        increaseArea: '20%' // optional
    });
}]);
app.controller("resourceTable",["$scope",function($scope){
    $('#resourceTable').bootstrapTable({
        columns: [
            {
                checkbox: true
            },{
                field: 'name',
                title: '资源名称',
                align:"left",
                halign:"center"
            }, {
                field: 'url',
                title: 'URL',
                align:"left",
                halign:"center"
            }, {
                field: 'creator',
                title: '创建人',
                align:"left",
                halign:"center"
            }, {
                field: 'createDate',
                title: '创建时间',
                align:"left",
                halign:"center"
            }, {
                field: 'isValid',
                title: '有效',
                width: 50
            }, {
                field: 'isShow',
                title: '显示',
                width: 50
            }],
        data: [
            {
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            },{
                name: 'web资源',
                url:'C:/ProgramData/Java/jdk1.8.0_92/bin',
                creator:'sysAdmin',
                createDate: '2016-12-30',
                isValid:"<input type='checkbox'/>",
                isShow:"<input type='checkbox'/>"
            }
        ],
        pagination :true,
        paginationLoop: false,
        striped :true,
        paginationPreText : "上一页",
        paginationNextText :"下一页",
        undefinedText : "暂无数据",
        showColumns :true,
        showExport : true,
        showRefresh :true,
        height:711,
        showPaginationSwitch:true,
        pageSize:15,
        pageList :[10,15,20]
    });
}]);